package edu.ecnu.yt.spring.di.compactdisc;

import java.util.List;

public class ListBlankDisc implements CompactDisc {

	private String title;
	private String artist;
	private List<String> tracks;

	public void setTitle(String title) {
		this.title = title;
	}
	
	public void setArtist(String artist) {
		this.artist = artist;
	}
	
	public void setTracks(List<String> tracks) {
		this.tracks = tracks;
	}
	
	/**
	 * 如果要在xml中使用property标签，应该需要一个默认的构造函数，防止无法进行构造。
	 */
	public ListBlankDisc() {
	
	}
	
	public ListBlankDisc(String title, String artist, List<String> tracks) {
		this.title = title;
		this.artist = artist;
		this.tracks = tracks;
	}
	
	public void play() {
		System.out.println("Playing " + title + " by " + artist);
		for (String track : tracks) {
			System.out.println("track : " + track);
		}		
	}

}
